home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_4
/
iinst151.lha
/
iNTERiNSTALL
/
iNTERiNSTALL.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-08-11
|
6KB
|
211 lines
/* iNTERiNSTALL v1.51
*/
/* Installs AmiTCP 3.0b2 & PPP 1.30 to provide Internet access via dialup.
This requires that AMITCP and PPP are in subdirectories of iNTERiNSTALL,
as `AmiTCP-3.0b2' and `PPP' respectively.
*/
/* By Christopher Laprise (email: chrisl@ici.net)
*/
arg cpu
cpu=word(cpu,2)
if ~show('Lib','rexxsupport.library') then call addlib('rexxsupport.library',0,-30,0)
say
say " iNTERiNSTALL performs an installation and setup for AMITCP and"
say " PPP that is apropriate for dialup Internet access. No other"
say " installation should be performed with these two programs. "
say
say " Please make sure you have un-arced them into the iNTERiNSTALL"
say " directory as per the readme file before proceeding."
say
say cpu "CPU detected."
options prompt "Proceed with install? (y/n) :"
pull pro
if pro~="Y" then exit
say
stat=0
address command 'search #?.IIMOD "#MODULE" nonum'
if rc>4 then do
say "No install modules were found in the iNTERiNSTALL dir."
stat=1
end
if exists("AmiTCP-3.0b2") then tcpsrc="AmiTCP-3.0b2"
else if exists("AmiTCP-4.0") then tcpsrc="AmiTCP-4.0"
else do
say "AmiTCP-3.0b2 or AmiTCP-4.0 subdirectory wasn't found in the iNTERiNSTALL dir."
stat=1
end
if ~exists("PPP") then do
say "PPP subdirectory was not found in the iNTERiNSTALL dir."
stat=1
end
if stat then exit
modules=""
address command 'list >t:interinstall #?.IIMOD FILES NOHEAD QUICK'
call open("L","t:interinstall","R")
do until eof("L")
modules=modules||" "||readln("L")
end
call close("L")
modules=strip(upper(modules))
if words(modules) > 1 then do
say
do i=1 to words(modules)
say i||")" word(modules,i)
end
do until pro>0 & pro<=words(modules)
options prompt "select: "
pull pro
end
modfile=word(modules,pro)
end
else modfile=modules
if cpu<68020 then cpu="000"
else cpu="020"
if ~exists("devs:networks") then address command "makedir devs:networks"
if ~exists("devs:networks/ppp.device") then address command "copy PPP/devs/ppp.device."||cpu||".eval devs:networks/ppp.device"
options prompt ": "
say
say "Enter the device name (ex: serial.device) for your modem"
parse pull devicename
if strip(devicename)="" then devicename="serial.device"
say
say "Enter the device unit# (ex: 0) for your modem"
pull devicenumber
if strip(devicenumber)="" then devicenumber=0
say
say "Enter the highest port speed (ex: 38400) for your modem"
pull portspeed
if strip(portspeed)="" then portspeed=38400
line=devicename devicenumber portspeed "0.0.0.0 SHARED 7WIRE CD SERBUF=4096 DIALSCRIPT=env:sana2/ppp.dial"
if ~exists("envarc:sana2") then address command "makedir envarc:sana2"
call open("A","ENVARC:sana2/ppp0.config","W")
call writeln("A",line)
call close("A")
call open("B","ENVARC:IPMODEMPORT","W")
call writeln("B",devicename||" "||unit)
call close("B")
if exists("ENVARC:ICISMODEMPORT") then address command "delete ENVARC:ICISMODEMPORT"
call open("I",modfile,"R")
call open("O","envarc:sana2/ppp.dial","W")
do until strip(upper(line))="#END"
line=readln("I")
if word(line,1)=";INSTALL" then do
say
say delword(line,1,1)
parse pull response
buf=readln("I")
buf=insert(response,buf,pos("$RESPONSE",buf)-1)
buf=delstr(buf,pos("$RESPONSE",buf),9)
call writeln("O",buf)
end
else if strip(line)~="" then call writeln("O",line)
end
call close("O")
call close("I")
say d2c(12)||"Installing from" tcpsrc
address command 'assign >env:TCPASSIGN AMITCP: exists'
if rc>4 then do
do until exists(tcppath)
say
say "Enter path where the AMITCP dir is to be created (ex: HD1:COMM)."
say "Do not enter iNTERiNSTALL or its subdirs"
pull tcppath
tcppath=strip(tcppath)
if tcppath="" then exit
if ~exists(tcppath) then say tcppath "DOES NOT EXIST."
end
if pos(right(tcppath,1),"/:")=0 then tcppath=tcppath||"/AMITCP"
else tcppath=tcppath||"AMITCP"
address command 'makedir "'||tcppath||'"'
address command 'assign AMITCP: "'||tcppath||'"'
end
else do
call open("A","env:TCPASSIGN","R")
tcppath=word(readln("A"),2)
call close("A")
say "...to the ASSIGNed path " tcppath
say
options prompt "Proceed? (y/n) :"
pull pro
if pro~="Y" then exit
end
say "Please Wait... Installing to" tcppath
address command 'copy from' tcpsrc 'to "'||tcppath||'"clone all quiet'
address command "copy from TCPADD to amitcp: clone all quiet"
if tcpsrc="AmiTCP-4.0" then
address command "copy from TCP4ADD to amitcp: clone all quiet"
else
address command "copy from TCP3ADD to amitcp: clone all quiet"
address command "copy from PPP/bin to amitcp:bin clone quiet"
address command "protect internet +S"
address command "protect stopnet +S"
address command "protect loadsocket +S"
address command "copy internet s: clone"
address command "copy PPP/PPP.guide amitcp:doc quiet"
address command "copy PPP/REGISTRATION amitcp:PPP-REGISTRATION quiet"
address command "copy stopnet amitcp:bin clone"
address command "copy amitcp:db/passwd-example amitcp:db/passwd"
options prompt ": "
call open("I",modfile,"R")
if tcpsrc="AmiTCP-4.0" then call open("O","AmiTCP:db/resolv.conf","W")
else call open("O","AmiTCP:db/netdb-myhost","W")
do until strip(upper(line))="#END"
line=readln("I")
end
do until eof("I")
line=readln("I")
if word(line,1)=";INSTALL" then do
say
say delword(line,1,1)
parse pull response
buf=readln("I")
buf=insert(response,buf,pos("$RESPONSE",buf)-1)
buf=delstr(buf,pos("$RESPONSE",buf),9)
call writeln("O",buf)
end
else if strip(line)~="" then call writeln("O",line)
end
call close("O")
call close("I")
if exists("s:user-startup") then mode="A"
else mode="W"
call open("U","s:user-startup",mode)
call writeln("U"," ")
call writeln("U","; iNTERiNSTALL 1.51")
call writeln("U",'assign AMITCP: "'||tcppath||'"')
call close("U")
say
say
say
say "--- Please replace any old `internet' and `stopnet' icons"
say "--- with the current versions."
say
say "iNSTALL COMPLETE. REBOOT AND TYPE `internet' TO CONNECT!"
call delay(1200)